﻿package org.leles.utils 
{
	/**
	 * ...
	 * @author Bruno Leles
	 */
	public final class StringUtils
	{
		public static function zeroFill( text:String, leadindZeros:uint, leadingCharacter:String = "0" ):String
		{
			if ( text.length >= leadindZeros ) return text;
			
			while ( text.length < leadindZeros )
			{
				text = leadingCharacter.concat( text );
			}
			
			return text;
		}
		
		public static function pluralize( n:Number, singular:String, plural:String ):String
		{
			if ( n == 1 ) return singular;
			return plural;
		}
	}

}